/**
 * Created by Administrator on 2015/11/30.
 */
$(function(){
    $("#menuul a").click(function(){
            var that=$(this);
            var url=that.attr("url");
            var title=that.text();
            addTab(url,title);
    });
})

function addTab(url,title){
    if(!$('#tabs').tabs('exists',title)){
        var html = '<iframe scrolling="auto" frameborder="0"  src="'+url+'" style="width:100%;height:100%;"></iframe>';
        $('#tabs').tabs('add',{
            title:title,
            content:html,
            closable:true
        });
        $('#tabs').tabs('getSelected').css("overflow","hidden");
    }else{
        $('#tabs').tabs('select',title);
    }
}